package controllers;

import java.util.Date;
import java.sql.Time;

public class Service {

    private int id;
    private String name;
    private TimeDisp startTime;
    private TimeDisp endTime;
    private TimeDisp departTime;
    private TimeDisp returnTime;
    private int driveTime;
    private String location;
    private boolean sun;
    private boolean mon;
    private boolean tue;
    private boolean wed;
    private boolean thurs;
    private boolean fri;
    private boolean sat;
    private Date startDate;
    private Date endDate;
    private int transnumb;

    public Service(){}

    public Service(int id, String name, Time startTime, Time endTime, int driveTime, String location,
            boolean sun, boolean mon, boolean tue, boolean wed, boolean thurs, boolean fri, boolean sat,
            Date startDate, Date endDate, int transnumb) {
        this.id = id;
        this.name = name;
        this.startTime = new TimeDisp(startTime);
        this.endTime = new TimeDisp(endTime);
        this.driveTime = driveTime;
        this.departTime = new TimeDisp(new Time(startTime.getTime() - driveTime*60000));
        this.returnTime = new TimeDisp(new Time(endTime.getTime() + driveTime*60000));
        this.location = location;
        this.sun = sun;
        this.mon = mon;
        this.tue = tue;
        this.wed = wed;
        this.thurs = thurs;
        this.fri = fri;
        this.sat = sat;
        this.startDate = startDate;
        this.endDate = endDate;
        this.transnumb = transnumb;
    }

    public Service(int id, String name, Time startTime, Time endTime, int driveTime, String location,
            Date startDate, Date endDate, int transnumb) {
        this.id = id;
        this.name = name;
        this.startTime = new TimeDisp(startTime);
        this.endTime = new TimeDisp(endTime);
        this.driveTime = driveTime;
        this.location = location;
        this.startDate = startDate;
        this.endDate = endDate;
        this.transnumb = transnumb;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public TimeDisp getStartTime() {
        return startTime;
    }

    public void setStartTime(Time startTime) {
        this.startTime = new TimeDisp(startTime);
    }

    public TimeDisp getEndTime() {
        return endTime;
    }

    public void setEndTime(Time endTime) {
        this.endTime = new TimeDisp(endTime);
    }

    public int getDriveTime() {
        return driveTime;
    }

    public void setDriveTime(int driveTime) {
        this.driveTime = driveTime;
    }

    public TimeDisp getDepartTime() {
        return departTime;
    }

    public void setDepartTime(TimeDisp departTime) {
        this.departTime = departTime;
    }

    public void setEndTime(TimeDisp endTime) {
        this.endTime = endTime;
    }

    public TimeDisp getReturnTime() {
        return returnTime;
    }

    public void setReturnTime(TimeDisp returnTime) {
        this.returnTime = returnTime;
    }

    public void setStartTime(TimeDisp startTime) {
        this.startTime = startTime;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public boolean isFri() {
        return fri;
    }

    public void setFri(boolean fri) {
        this.fri = fri;
    }

    public boolean isMon() {
        return mon;
    }

    public void setMon(boolean mon) {
        this.mon = mon;
    }

    public boolean isSat() {
        return sat;
    }

    public void setSat(boolean sat) {
        this.sat = sat;
    }

    public boolean isSun() {
        return sun;
    }

    public void setSun(boolean sun) {
        this.sun = sun;
    }

    public boolean isThurs() {
        return thurs;
    }

    public void setThurs(boolean thurs) {
        this.thurs = thurs;
    }

    public boolean isTue() {
        return tue;
    }

    public void setTue(boolean tue) {
        this.tue = tue;
    }

    public boolean isWed() {
        return wed;
    }

    public void setWed(boolean wed) {
        this.wed = wed;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date EndDate) {
        this.endDate = EndDate;
    }

    private String day;

    public void setDay(String dayToSet) {
        day = dayToSet;
    }

    public String getDay() {
        return day;
    }

    public int getTransnumb() {
        return transnumb;
    }

    public void setTransnumb(int transnumb) {
        this.transnumb = transnumb;
    }
}
